I have a table in ms-sql
obm_FeeTable
FeeId int,
FranchieId int,
Amount Money,
ChequeNo int,
BankName nvarchar(200),
PaymentDate DateTime
when I want to display all collection in crystal report it don't show Amount / PaymentDate
when creating report, don't know why its doing like this.
Please help why is it doing like this. also how to use linq with Crystal Report.
Thanks
To get fields to show up in Crystal's data connection, I often have to go to Database->Set Datasource location and then re-select the same table/view/stored proc I am using. Click the name of your table/view/Stored Proc in both the top and bottom windows. This tells CR to "change" the datasource from the old one (without new fields) to the new one (with new fields) even though they are the same view/table/proc. Then click update. This will reconnect your report with the same datasource, but will pick up any of the changes (new fields) in said datasource.
Yes, you can use LINQ with Crystal, it doesn't matter as long as the data you pull with LINQ ends up as something Crystal can understand. It needs to be stored in a DataSet or DataTable that Crystal can understand (you need to set the reportdatasource to your DS or DT, and it works great.
Have you recently modified the table to add these fields? If so, perhaps Crystal doesn't know about them yet. To fix this, right-click inside the report, select "Database" -> "Log On or Off Server...". OPen The "Current Connections" item and select the one where your table lives. Click the "Log Off" button and then the "Log On" button. This will refresh Crystal's view of the database objects, and you missing fields should appear.
Another possibility is that the login you are using to access the table doesn't have 'select' permission on thos columns.
I don't think linq is applicable to Crystal, but the is a very different question. You should probably post it separately with more detail on what you want to do.
Related
In FSCM I am looking to modify the Search view on Add/Update PO page (Main Menu--> Purchasing--> Purchase Orders--> Add/Update POs) to display the Requisition ID associated with the PO in the search results page. The only table I have found that has both PO_ID and REQ_ID is PS_PO_LINE_DISTRIB however unless I use a SELECT DISTINCT clause I will get multiple PO_ID rows when there are more than 1 line on a PO.
Within Purchase Order Inquiry you can see the related Requisition ID's related to a PO by clicking on Document Status link inside the Purchase Order inquiry details page.
I started looking at the PeopleCode within the the Purchase Order Inquiry to see how they are linking the PO to a Requisition and it appears to use work tables with related PeopleCode function libraries, but I wasn't able to figure our how they get linked. I am hoping someone else may know the answer to this. Thank you.
I'm on an old version of PeopleSoft (SCM 8.80, Tools 8.51), so your mileage may vary. I'm assuming you're familiar with App Designer. If not, comment below and I'll add some details about what I'm clicking on.
Find the name of the Add/Update PO component.
Open the PURCHASE_ORDER component in App Designer. Now let's find the name of the search record. Note that there is a different record for the Add Search Record, so if you want to change that too, do all of this for that record as well.
Open the PO_SRCH record, and add the REQ_ID field to it. Make sure you mark the field as a key. You should consider saving your modified PO_SRCH under a new name in case you want to be able to revert to vanilla PeopleSoft. If you do, change the Search Record in the component to your new record name.
We can see that PO_SRCH is a view. So let's modify the view to pull in REQ_ID from PO_LINE_DISTRIB. As you mentioned above, there doesn't appear to be another table with both PO_ID and REQ_ID, so you'll have to do a SELECT DISTINCT.
We should do a LEFT OUTER JOIN instead of a standard join because if you do a standard join and you enter a purchase order with no lines and save it, then you'll never be able to retrieve that purchase order in this window. Since REQ_ID is a key field, we can't have a null, so we have to do the CASE.
One odd thing that I ran into here was building the view now gave me an error about selecting fewer columns in the SQL than I had in my record definition. I solved it by modifying the view for SQL Server. I've never had to do that before and I don't know why I had to do it for this specific record. But anyway, I entered the same SQL under the record's "Microsoft SQL Server" definition.
In the properties of PO_SRCH, we can see that it has a related language record. If you're only using one language, you can probably get away without changing this, but I'll do it for completeness. Open PO_SRCHLN. Now add REQ_ID to it (mark it as a key field like you did above), and save it as PO_SRCHLN2 (I'm saving it under a new name so I don't break anything else that may be using PO_SRCHLN).
Edit the SQL the same was as you did above. Note: I didn't have to also change the Microsoft SQL Server definition like I did above. I have no idea why.
Now build PO_SRCHLN2.
Go back to PO_SRCH and change its related language record to PO_SRCHLN2.
Now build PO_SRCH.
Hopefully you didn't get any errors and your search page has the requisition ID in it now. My system doesn't use requisitions so they're all blank in the example below, but the new field is there.
I'm using XtraReports 12.2.12 in my lightswitch project.
This projects connects to a sql database as datasource.
I created a report class and added a query as datasource for the report.
Then added a detailreport with the context menu -> "Insert detail report" to a bound list. (Suggested by xtrareports)
This bound report actually contains the data of a n to n mapping table with references to the corresponding tables. In the detailreport I try to display the data of one of these tables but receive only empty fields.
The funny thing is - the rowcount of empty rows (countable because of the labels I inserted into the report) is correct - only the data is missing.
I thought maybe the xtrareports component is not able to load the data from the referenced table but even the data from the detail report main table is not shown.
Maybe someone could give me a hint on how to solve this.
Thx in Advance
Steve
The solution for this problem was to get rid of the unbound datasource in the report and put every subreport in a separate report class and then insert XRSubReport Control in the main report to include the newly created report, pass parameters and handle BeforePrint events correctly.
[Thanks to Filburt and Devjosh. I have restructured the post and included my attempt approach. ]
I have a table on my SQL DB call ReportList which is a list of report. I need to go through that list and interrogate the reportserver, eport by report, to populate a table called ReportParameters. The ReportParameters table has a column for ReportOwnerID which needs to contains the ReportID value of the corresponding (owner) report as listed in the ReportList table.
This is in VB.NET 2005 ASP2.0 and I have ended up with a mess. Please help me with the cleanest approach to doing this.
It needs to work so:- I have a listbox of the reports as per REportList and a GridView that list all the parameters (uniquely - most of the parameters are common to many reports) the idea being that the parameters get set once and the report can be kicked off by selecting them in the ReportList CheckListBox and clicking on Execute.
I would like it that as I click on a particular report in the ListView, the relevant parameters in the Gridview get a green background and those that do not apply are red. The leftmost column in the gridview contains tha Parameter NAME (not editable) and the next column must be editable to populate the value.
DONE SO FAR:
I have tried on clicking the EXECUTE button , to build a parameters string in a testbox and call that with the Javascript OpenReportWin() function when I open the report in a new window. This works fine, but my biggest issue it interrogating the reportserver reports to get back a list of parameters and dooping them into a table. I have triend to use a hidden DataGrid bound to a ds onto the reportParamaters table; I have tried to poulate it using a datalist but I cannot get the hang of these thionsg and its looking messy. Ther must be a simple clean way of gettting the .GetParameters resultset back from the report server and populating the table without having to create a reportviewer object and cycling through the list of reports - it then has to render each report before you can get that list out.
Thanks
I will withdraw this for now. I will submit a solution when I am comfortable that I have reahced a clean solution.
Mac
PLEASE CLOSE!!!
I have looked through the entire internet (well that's what it feels like) to find this out.
Tables - Authors and Titles
add new title must be linked to an author, so I need to check that the author exists, if so, update the titles table with the user data from the textboxes. If the author does not exist, I need to insert the author first & last name into the author table, then the title info into the title table.
this is in VB, using ASP.NET, and my database is a file, I'm not using SQL server, just Visual Studio 2008.
Many thanks in advance for any guidance
Dim insertParameters As New ListDictionary()
insertParameters.Add("ISBN", ISBNTextBox.Text)
insertParameters.Add("Title", titleTextBox.Text)
insertParameters.Add("EditionNumber", editionNumberTextBox.Text)
insertParameters.Add("Copyright", copyrightTextBox.Text)
insertParameters.Add("FirstName", firstTB.Text)
insertParameters.Add("Surname", secondTB.Text)
LinqDataSource1.Insert(insertParameters)
It sounds to me like you should take a step back to get the big picture. Here is a link to a video to get you started on LinqToSQL http://www.youtube.com/watch?v=zy4Y34brSC8&feature=related. The reason I say that is it appears as though you might be missing the fundamentals and trying to put the cart before the horse so to speak. And here is a link to the MS documentation which I believe should really help you in the long run http://msdn.microsoft.com/en-us/library/bb386976%28v=VS.90%29.aspx
I am implementing an online parking reservation system and I need to bind a table with 2 Controls.
for example the user selects a Reservation start date and the parking location from a RadioButtonList and then a button (Search Availability) is pushed to fetch the parking from the database according to the Date selected and Location.
the question is: How can I bind the (Reservation Start Date Control) with (RadioButtonList) to both search in the database? and what would be the Sql Query?
Regards.
This is pretty basic stuff so you've got a lot of work ahead of you.
On your aspx page, you will want to use a SqlDataSource and add two ControlParameters to the SelectParameters, one for the RadioButtonList, one for the TextBox/Calendar with the date. Then create a GridView control to display the results and set the DataSource of the gridview to be the SqlDataSource.
Depending on your database schema, the SQL Statement will look something like this:
SELECT * FROM [Parking] WHERE [LotID] = #LotID AND [Date] = #Date AND [Reserved] = FALSE;
However, I have done reservation systems in the past, and queries to find available spots for a particular day are rarely simple. I would suggest worrying about writing the SQL query first and then getting the web page to run the query later. If you post information about your table schema and tag it as a SQL question you'll probably have better luck.
Hope this helps.