Use Variable in SQL Command SSIS of ADO net source - ssis

I am using Visual Studio 2019 Community edition. I was trying to configure and ADO Net Source using SQL Command. However, I need to pass parameters to it. Is there an easy way to inject SSIS Variables into it?

Yes, you can do it, using expression.
Open data flow task, right-click on empty space there and choose "Properties".
In "Properties" window choose "Expressions"
In opened window choose [Your data source].[SqlCommand] and add you variable there in Expression input.

Related

How can execute flexible search on japers reports?

I'm beginner in hybris. I need to create a jasper reports, using flexible search and mysql server. But I can only use the sql query statement without flexible search in report file (Jrxml source file (.jrxml)).
How can I using the flexible search with mysql?
Are you following the guide provided in Hybris Help for building a custom report? It can be found at https://help.hybris.com/6.3.0/hcd/8b6e40ee86691014b99eda29aebc9d84.html
In the interest of having a source of information in case the link ever becomes dead:
Go to ${HYBRIS_DIR}/hybris/bin/platform
setantenv.bat for Windows or . ./setantenv.sh for Unix/Linux
Go to ${HYBRIS_DIR}/hybris/bin/ext-platform-optional/virtualjdbc
Run the ant command ant dist
Go to ${HYBRIS_DIR}/hybris/temp/hybris/virtualjdbc. You should have two files that have been generated here, hybris-virtualjdbc.jar and vjdbc.jar
You now need to copy these two files to ${HYBRIS_DIR}/hybris/bin/ext-platform-optional/virtualjdbc/lib
Download the Jaspersoft Studio Tool at http://community.jaspersoft.com/project/jaspersoft-studio
Install and Open Jaspersoft Studio
Go to Tools > Options > iReport > Classpath
Click Add JAR twice, each time selecting one of the newly copied JAR files (hybris-virtualjdbc.jar and vjdbc.jar)
Click OK
You now need to setup the Data Source, to do this:
Click on the Report Datasource icon ()
In the newly opened window, click New
Select Database JDBC Connection and click Next
On the next screen you may provide any name for your JDBC Connection
In the JDBC Driver field, make sure you type de.hybris.vjdbc.VirtualDriver
In the JDBC URL field, make sure you type jdbc:hybris:sql:http:///virtualjdbc/service, where is the location of your application server (e.g. https://localhost:9002). Remember this will change with each environment!
Provide a Hybris User for the Username and Password. It may be worth using the admin user to begin with, but make sure you lock it down at a later stage to a user with less access, such as vjdbcReportsUser
Test the connection. Remember you will need the server up and running to be able to use vjdbc
From here onwards, you should be able to create a report using Flexible Search style syntax!

Using external assembly's method's results as a dataset

Using SQL2008R2:
I am trying to create a dataset that is simply the result of an external assembly's return method(s), but everything I can find regarding using custom/external assemblies just has a textbox's value set to the external assembly's method's result via an expression.
I simply want Report Server to do the data processing in the external assembly and bind that result to a very simple report.
I found some references to something about MDX but they seem to be a few years outdated and needed to know if this is possible.
Assuming you already have a .dll - Place your dll in the report designer folder (where your RDL is) and the report server folder, somewhere around here:
Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies
Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin
Now add a reference to your dll from your report.
With your report open go to Report, Report Properties, References, Add reference, browse to your dll and add it.
Now in a text box properties Value call a method of your dll. It should look something like this:
=MyDllName.ClassName.MyMethodOrSubOrWhatever
This is a great article that can walk you through this:
Assuming you already have a .dll - Place your dll in the report designer folder (where your RDL is) and the report server folder, somewhere around here:
Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies
Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin
Now add a reference to your dll from your report.
With your report open go to Report, Report Properties, References, Add reference, browse to your dll and add it.
Now in a text box properties Value call a method of your dll. It should look something like this:
=MyDllName.ClassName.MyMethodOrSubOrWhatever
This is a great article that can walk you through this: http://support.microsoft.com/kb/920769
P.S. Another option, if you don't want the web server doing the heavy lifting, is to use stored procedures. However, in our experience with very large database systems, it is much easier to scale up the web servers than it is to scale up the database servers so we do much of the heavy lifting on the web servers.
If you need a data set that is generated by custom .NET code, you can either set up a web service (here's a good tutorial), or you can set up a custom "data processing extension".
A data processing extension will allow you to choose a new data source in the SSRS report designer, and this data source will run custom .NET code. The full description is on MSDN, but here are the basic steps:
Create a new class library project
Implement all of the required extensions (and any desired optional ones)
Copy the DLL to the SSRS bin folder
Edit the SSRS config file to register your extension (by specifying the fully qualified name of your IDbConnection class)
You can find working examples from both CodePlex and Microsoft.

Crystal reports 2011 with command object on 64bit for paramters

We are using Crystal reports 2011 with SQL Server 2008 R2. We are trying to use dynamic parameters and using command object to populate the dynamic pick list.
The dynamic picklist is not populating and showing just a empty textbox while running on 64bit. I tried to run the profiler and there is no db command executed.
If I use a view instead of command object for populating the parameter - then it works. If I set the IIS to have 'Enable 32 bit application' to true, then even the command object works works. Is this a problem with choosing the correct driver? If so how do I do that?
Any ideas/help?
Thanks
Shankar.
This seems to be a bug in the crystal reports 2011 version.
More details:
http://scn.sap.com/message/14117796
http://scn.sap.com/thread/3342435?start=30&tstart=0
Thanks
Shankar.

Building an SSIS 2008 solution using TFS 2008

I am trying to build an SSIS 2008 solution using TFS 2008. I created a 'TFSBuild.proj' file using the build definition wizard. My build appears to work, but fails at the final step with the error...
(0,0): warning MSB4126: The specified solution configuration "Release|Any CPU" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration.
I've tried...
Leaving the 'FlavorToBuild' & 'PlatformToBuild' values blank in the 'TFSBuild.proj'
Amend the 'FlavorToBuild' & 'PlatformToBuild' values in the 'TFSBuild.proj' file to various other strings
Any ideas?
Apparently you can't build SSIS project files, out of the box, because they are not in MSBuild format. Great!! - Sarcasm overload.

Can a SSRS report open up in an Excel spreadsheet within SSRS rather than exporting it from SSRS to Excel?

We would like to have a SSRS report open up in an Excel spreadsheet within the SSRS environment rather than exporting it from the SSRS environment to Excel. Is this possible?
You can take the report's URL and append &rs:Format=EXCEL on it. This will give you the report in Excel. The possibilities here are that you can write a small app that generated the URL you want with the parameter settings you want which then you can use Response.Redirect(url) to open it.
Besides that, you can write a more comprehensive application that simulates SSRS' parameter interface using SSRS Soap services framework. I'm actually 2/3 of the way done with doing this very thing and it works nicely.
You could also just include the sql in excel! It would be missing the SSRS features, but if all you want is the data in Excel:
Data tab >> From Other Sources >> From SQL Server >> [enter server name] >> [select a database] >> Finish >> Properties >> Definition >>
At this point, change the "Command type" to be SQL and the Command text to your sql query. You may need to include these if you have temp tables:
SET ANSI_WARNINGS OFF;
SET NOCOUNT ON;
(sorry, it takes a few steps to get there!)