How to change the parameter type in crystal report of the existing report? - vb.net

I have a crystal report with 2 subreports. The type of the one of the field got changed in the database from number to string. The main report has no parameters but the subreport has this parameter. Now when I try to run the report I get the error in the record selection formula. A string is expected here. My question is How do I make the type change for that field so that I can run my report. ?

Easy to do. And FUN, too!
Assuming you can change the link to the subreport, you can:
1) create a formula to manipulate that field in the main report, explicitly converting it into the format you neend. Then,
2) use THAT formula as the link to the subreport
Should work a charm, "Bob's yer oncle", and all that.

The solution was to remap the bindings of the report with the changed datatype in the dataset

Related

How to sort a Crystal Report in Visual Studio 2015

I am using crystal report add-on on my visual studio 2015. I have a problem, I have access database with table looks like in images:
I want to sort my database with field tanggal_pembayaran as parameters, using group selection in selection formula on crystal report but here is what the formula looks like:
I don't know which formula to use to make it like that parameter becomes the initial limit for the report date to display data with date above the entered date which i don't know how.
To Filter and Sort by a Parameter field in crystal report
create a parameter Field
right click the parameter field in field explorer and add new
give name and datataype (here datetime)
to filter data using parameter field
Go to Reports>>Selection Formula>>Records and provide formula
here it will be like
{Customers.CreationDate}<{?Creationdate} save and close
to Sort data using parameter
Go to Report >> Record Sort Expert>>From report field add the Parameter field.If not visiable add the field first to the report then it will be visibale

How do I pass the same parameter to multiple Command statements in Crystal Reports XI?

My DB does not have the tables I need, so I have to create custom SQL queries (commands in Crystal terminology), embed the results in a subreport, and fill my report with subreports. Here's what I want to happen:
Report asks user for a date
That date gets passed into the subreports
The date passed into subreports gets used in the query.
User only has to enter date once, everything else happens behind the scenes
Here's what actually happens:
User is asked for date for subreport 1
User is asked for date for subreport 2
etc etc
User gets frustrated and report is unsuccessful.
I know I can link parameter fields between reports, but as I understand it, I cannot do the same with commands. How can I rectify this?
Right-click on the subreport object and choose Change SubReport Links,
then select how the parameter is to be used by the subreport.
Courtesy: #MartW
I was wrong about the links not working. They do work, with modification.
As long as your queries are using parameters named the same way, this can work. With the default linking, you'll get a parameter window that looks like this: https://imgur.com/LF3PffB. If you modify your linking to look like this: https://imgur.com/t0HpMEC, then the reportingDate parameter used in the main report will be passed into the individual SQL queries of the subreports, as expected. Thanks to Nepali for pushing me in the right direction!

Issue related to the parameter of report in Pentaho Report Designer

I have a chart that contains 4 parameters and every parameter is related to the following one, i success i having the result of the chart by selecting the whole parameters one after the other,
The probleme is that i want to have another option by having the result of the chart by selecting also just one parameter or having the result without selecting any parameter
Can you please help me as soon as possible
Thanks a lot
There is one checkbox available while creating a parameter "Mandatory".Just remove the Right click from the checkboxes while creating all four parameters.Now you can check your result while selecting any parameter you want.

What do multiple reports listed in a single SSRS report mean?

I have one SSRS report like following (image)
I'm new to SSRS; what does this report mean?
If I need to change any parameter value for this kind of report, do I need to go to every report and change the parameter for them individually?
Question:
What does this SSRS report mean?
Answer:
Portfolio dashboard = Main report
Portfolio_XXX = all 8 are subreports.
The subreports may or may not link with the main report. To find the report link, you can right-click on the subreport (gray) then report link.
Question:
Do I need to go to every report and change the parameter for them individually?
Answer:
If you are changing parameter name/type and subreport are linked or use parameter to filter the data, then YES you have to change in main report and subreport.
If all of your reports use same parameters then you only need to make changes onto main report, but if sub reports have their own parameters then you should change main report as well as sub reports parameters.
You have two ways to change the parameter of any SSRS report.
At the design time: When you are designing your report you can set the input parameters in report. You can provide a default value or you can leave this part if you are not willing to provide default parameters.
At run time: When you preview your report or view report in browser, then you can provide parameters if that reports is parametric. You can change the parameters here.
Please note that, if you have provided default parameters and you view report in browser/preview then it shows the default parameters.
You can use subreports if all reports are expecting the same parameters. If not is is best to go another route. I've only had to use one subreport for recent projects.
This is one of main features of sub reports to be able to use same parameters for all of them, so most likely they are the same, but final call should be made upon complete review, including any expressions involved. M

Dynamic SSRS report

I had a problem in creating the Dynamic report in SSRS. My problem is:
In a table I have stored SQL scripts with the column SQLScripts. If you execute these SQL scripts you get different number of columns for each script.
My problem is, I have one report with buttons of these scripts, for example test1, test2...like that. If you press test1 button this should take the test one SQL script and should display the report with appropiate columns in that sqlscripts.
I can't create individual reports for each test report, they are plenty. Are there any options for me to solve this problem...
The only way I've been able to get this to work sofar is:
Each report has 2 datasets.
ReportData
DataHeaders
The "DataHeaders" need to have the proper name of the datafields in "ReportData". Be careful since SSRS replaces blanks and special characters with "_"
Now, create a table (or matrix) and drag the DataHeaders as the Columns of your report. (This should be a grouped column). If you run it at this point, you'll see all your columns without any data. Now comes the magic:
Create another report that takes a "DataField" parameter. Create another table or matrix within this report and set it's dataset property to be "ReportData". In the DATA cell for the table, set it to the expression =Fields(Parameters!DataField.Value).Value
Now go back to your first report. Right click and insert a subreport. Right click on the subreport and select "Subreport Properties". Under general, select the second report you created to be used as the subreport. Under parameters, select the DataField parameter and set its value to something like =Fields!DataField.Value
In my case I did some formatting in this expression to fix the above mentioned issue with spaces and special characters, since my stored procedure was initially used in ASP.NET and this was just a proof of concept.
Also in my experience the performance isn't great. In fact it was kinda slow, though I haven't had a chance to switch it to use a shared dataset, which I suspect would help a bit. Please let me know if you find a better solution.
I have not found a way to do this completely dynamically. Here is a similar question with some possible solutions:
How do i represent an unknown number of columns in SSRS?
You basically need to create a 'master dataset' from the other Datasets that are based on your multitude of SQL scripts first.The master dataset should contain the data to be presented in it's most simplistic form, i.e. in a simple list format.
Finally, go to the toolbar in SSRS and drag a 'Matrix' into the report. A Matrix table acts similar to a pivot table in Excel or a CrossTab query in Access that will display whatever's in the Dataset.