I have a few features (Complete, which has 2 child features, namely AppFeature and DBFeature) in my Product.wxs, as shown below.
<Feature InstallDefault="local" Description="!(loc.FullFeatureDesc)" Title="!(loc.FullFeatureTitle)" Level="1" Id="Complete" Absent="allow" AllowAdvertise="no" Display="expand">
<Feature InstallDefault="local" Description="!(loc.AppFeatureDesc)" Title="!(loc.AppFeatureTitle)" Level="1" Id="AppFeature" Absent="allow" AllowAdvertise="no" Display="expand">
<ComponentGroupRef Id="AppCG"/>
</Feature>
<Feature InstallDefault="local" Description="!(loc.DBFeatureDesc)" Title="!(loc.DBFeatureTitle)" Level="1" Id="DBFeature" Absent="allow" AllowAdvertise="no" Display="expand">
<ComponentGroupRef Id="DbCG"/>
</Feature>
</Feature>
In another dialog, I have a few checkboxes for All, App and DB options, each meant for a feature (All means both App and DB). I want to associate App checkbox to App
feature and DB checkbox to DB Feature. I tried it using Publish element in the Next button on that dialog using the Event="AddLocal" and Value="AppFeature" and one for DBFeature with the checkbox values checked appropriately. But on clicking on Next button, nothing happens. Can anyone please help me? I am also providing the elements on the dialog for reference.
<Control Id="ControlAllFeature" Type="CheckBox" X="180" Y="33" Width="140" Height="17"
Property="ALLFEATURES_CHECKED" CheckBoxValue="AllFeatureValue" Text="Install Everything">
<Publish Property="APPFEATURE_CHECKED" Value="AppFeatureValue" Order="1">ALLFEATURES_CHECKED</Publish>
<Publish Property="APPFEATURE_CHECKED" Value="{}" Order="2">NOT ALLFEATURES_CHECKED</Publish>
<Publish Property="DBFEATURE_CHECKED" Value="DBFeatureValue" Order="3">ALLFEATURES_CHECKED</Publish>
<Publish Property="DBFEATURE_CHECKED" Value="{}" Order="4">NOT ALLFEATURES_CHECKED</Publish>
</Control>
<Control Id="ControlAppFeature" Type="CheckBox" X="191" Y="50" Width="140" Height="17"
Property="APPFEATURE_CHECKED" CheckBoxValue="AppFeatureValue" Text="Install Application">
<Publish Property="ALLFEATURES_CHECKED" Value="{}" Order="1">NOT APPFEATURE_CHECKED</Publish>
<Publish Property="ALLFEATURES_CHECKED" Value="AllFeatureValue" Order="2">APPFEATURE_CHECKED AND DBFEATURE_CHECKED</Publish>
</Control>
<Control Id="ControlDBFeature" Type="CheckBox" X="191" Y="67" Width="140" Height="17"
Property="DBFEATURE_CHECKED" CheckBoxValue="DBFeatureValue" Text="Install DB">
<Publish Property="ALLFEATURES_CHECKED" Value="{}" Order="1">NOT DBFEATURE_CHECKED</Publish>
<Publish Property="ALLFEATURES_CHECKED" Value="AllFeatureValue" Order="2">APPFEATURE_CHECKED AND DBFEATURE_CHECKED</Publish>
</Control>
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="&Back">
<Publish Event="NewDialog" Value="CustLicenseAgmtDlg">1</Publish>
</Control>
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="&Next">
<Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">CostingComplete = 1</Publish>
<Publish Event="NewDialog" Value="BrowsePathDlg"></Publish>
<Condition Action="disable">NOT APPFEATURE_CHECKED OR NOT DBFEATURE_CHECKED</Condition>
<Condition Action="enable">APPFEATURE_CHECKED OR DBFEATURE_CHECKED</Condition>
<Publish Event="Remove" Value="ALL" Order="1">1</Publish>
<Publish Event="AddLocal" Value="AppFeature" Order="2">APPFEATURE_CHECKED</Publish>
<Publish Event="AddLocal" Value="DBFeature" Order="3">DBFEATURE_CHECKED</Publish>
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
I referred the link below for this, but couldn't get it working. Any help will be really appreciated.
Wix 3.5, Install features based on checkboxes
I changed the approach. There are actually 2 ways. One is to do it in Product.wxs within the feature elements to have a condition. The other one gives better control. The mark up below explains it.
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="&Next">
<Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">CostingComplete = 1</Publish>
<Publish Event="NewDialog" Value="BrowsePathDlg">1</Publish>
<Condition Action="disable">NOT APPFEATURE_CHECKED OR NOT DBFEATURE_CHECKED OR (((!AppFeature = 3) AND (!DBFeature = 2) AND NOT DBFEATURE_CHECKED) AND ((!DBFeature = 3) AND (!AppFeature = 2) AND NOT APPFEATURE_CHECKED)) OR ((!AppFeature = 3) AND (!DBFeature = 3))</Condition>
<Condition Action="enable">(APPFEATURE_CHECKED OR DBFEATURE_CHECKED) AND (((!AppFeature = 2) AND APPFEATURE_CHECKED) OR ((!DBFeature = 2) AND DBFEATURE_CHECKED))</Condition>
<Publish Event="AddLocal" Value="ALL">1</Publish>
<Publish Event="Remove" Value="AppFeature"><![CDATA[APPFEATURE_CHECKED <> "1"]]></Publish>
<Publish Event="Remove" Value="DBFeature"><![CDATA[DBFEATURE_CHECKED <> "1"]]></Publish>
</Control>
What I was missing earlier was the value of 1 in the Publish NewDialog event. Once I added it, it started working and clicking on the Next button, took me to the next dialog.
Try this:
in your chield feature put it in level 0, and them put a condition inside her to validate if the checkbox was checked
<Feature InstallDefault="local" Description="!(loc.FullFeatureDesc)" Title="!(loc.FullFeatureTitle)" Level="1" Id="Complete" Absent="allow" AllowAdvertise="no" Display="expand">
<Feature InstallDefault="local" Description="!(loc.AppFeatureDesc)" Title="!(loc.AppFeatureTitle)" Level="0" Id="AppFeature" Absent="allow" AllowAdvertise="no" Display="expand">
<ComponentGroupRef Id="AppCG"/><Condition Level="1">APPFEATURE_CHECKED</Condition>
</Feature>
<Feature InstallDefault="local" Description="!(loc.DBFeatureDesc)" Title="!(loc.DBFeatureTitle)" Level="1" Id="DBFeature" Absent="allow" AllowAdvertise="no" Display="expand">
<ComponentGroupRef Id="DbCG"/>
</Feature>
</Feature>
Related
I am trying to rebuild my old WinForms application using Xamarin Forms for more portability.
The application uses a TabControl, and the docs say that the closest Xamarin Forms element is the TabbedPage.
Here is the code:
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:MyApp"
x:Class="MyApp.MainPage">
<TabbedPage.ToolbarItems>
<ToolbarItem Text="Settings"
Order="Primary"
Priority="0" />
<ToolbarItem Text="Tools"
Order="Primary"
Priority="1" />
<ToolbarItem Text="Help"
Order="Primary"
Priority="2" />
</TabbedPage.ToolbarItems>
<TabbedPage.Children>
<ContentPage Title="Main">
<Label Text="Coming soon!"/>
</ContentPage>
<ContentPage Title="Today">
<Label Text="Coming soon!"/>
</ContentPage>
<ContentPage Title="This week">
<Label Text="Coming soon!"/>
</ContentPage>
</TabbedPage.Children>
</TabbedPage>
It works well on my UWP build:
However, on my WPF build, it does not show the toolbar, making it impossible to switch tabs:
So what am I doing wrong here?
Thanks.
Update #1: I've tried to build the GTK target, it works correctly:
This screenshot is taken on Ubuntu. GTK# on Windows works the same way, but the drawing of the controls are too buggy.
After messing up with the element picker in the toolbar, I've finally found an answer:
There ARE buttons to switch between tabs in WPF. However, they are just invisible:
Setting the BarTextColor property in TabbedPage fixes the problem:
So the resulting code is:
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:TimetableApp"
x:Class="TimetableApp.MainPage"
BarTextColor="Black">
<TabbedPage.ToolbarItems>
<ToolbarItem Text="Settings"
Order="Primary"
Priority="0" />
<ToolbarItem Text="Tools"
Order="Primary"
Priority="1" />
<ToolbarItem Text="Help"
Order="Primary"
Priority="2" />
</TabbedPage.ToolbarItems>
<TabbedPage.Children>
<ContentPage Title="Main">
<Label Text="Coming soon!"/>
</ContentPage>
<ContentPage Title="Today">
<Label Text="Coming soon!"/>
</ContentPage>
<ContentPage Title="This week">
<Label Text="Coming soon!"/>
</ContentPage>
</TabbedPage.Children>
</TabbedPage>
I have created an Office add-in for Word Online but I can't get SSO working.
When the add-in is activated Word Online prompts the user for accepting the Add-in permissions, But I can’t get the SSO Token via Office.js.
When getAccessTokenAsync() first is called, I get no response or errors. If I call the function again I get error code 13008. Which indicate that the operation is running, but the result is never returned.
The manifest file is provided with
<WebApplicationInfo>
<Id>00e69b3f-c86c-4764-9e6e-xxxxxxxx</Id>
<Resource>api://localhost:43443/00e69b3f-c86c-4764-9e6e-xxxxxxxx </Resource>
<Scopes>
<Scope>openid</Scope>
<Scope>offline_access</Scope>
<Scope>user.read</Scope>
<Scope>profile</Scope>
</Scopes>
</WebApplicationInfo>
Azure Endpoint v2 registration
The add-in is registered at https://apps.dev.microsoft.com
Platform Web Api:
api://localhost:43443/00e69b3f-c86c-4764-9e6e-xxxxxxxx
Pre-authorized application:
bc59ab01-8403-45c6-8796-ac3ef710b3e3
57fb890c-0dab-4253-a5e0-7188c88b2bb4
d3590ed6-52b3-4102-aeff-aad2292ab01c
Permissions:
openid
offline_access
user.read
Profile
I have granted administrator consent using
https://login.microsoftonline.com/common/adminconsent?client_id=00e69b3f-c86c-4764-9e6e-xxxxxxxx&state=12345
Update:
If the same manifest is sideloaded into Powerpoint online or Excel/Spreadsheet online it can get the token by calling getAccessTokenAsync(), but still not in Word Online
Document Host
<Hosts>
<!--Each host can have a different set of commands. Cool huh!? -->
<!-- Workbook=Excel Document=Word Presentation=PowerPoint -->
<!-- Make sure the hosts you override match the hosts declared in the top section of the manifest -->
<Host xsi:type="Document">
<!-- Form factor. Currenly only DesktopFormFactor is supported. We will add TabletFormFactor and PhoneFormFactor in the future-->
<DesktopFormFactor>
<!--GetStarted information used on the callout that appears when installing the add-in.
Ensure you have build 16.0.6769 or above for GetStarted section to work-->
<GetStarted>
<!--Title of the Getting Started callout. resid points to a ShortString resource -->
<Title resid="dt.GetStarted.Title"/>
<!--Description of the Getting Started callout. resid points to a LongString resource -->
<Description resid="dt.GetStarted.Description"/>
<!--Not used right now but you need to provide a valid resource. We will add code in the future to consume this URL.
resid points to a Url resource -->
<LearnMoreUrl resid="dt.GetStarted.LearnMoreUrl"/>
</GetStarted>
<!--Function file is an html page that includes the javascript where functions for ExecuteAction will be called.
Think of the FunctionFile as the "code behind" ExecuteFunction-->
<FunctionFile resid="dt.FunctionFile.Url" />
<!--PrimaryCommandSurface==Main Office Ribbon-->
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<!--Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab -->
<!-- Documentation includes all the IDs currently tested to work -->
<CustomTab id="dt.Tab1">
<!--Group ID-->
<Group id="dt.Tab1.Group1">
<!--Label for your group. resid must point to a ShortString resource -->
<Label resid="dt.Tab1.GroupLabel" />
<Icon>
<!-- Sample Todo: Each size needs its own icon resource or it will look distorted when resized -->
<!--Icons. Required sizes 16,31,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX -->
<!--Use PNG icons and remember that all URLs on the resources section must use HTTPS -->
<bt:Image size="16" resid="dt.TaskpaneButton.Icon" />
<bt:Image size="32" resid="dt.TaskpaneButton.Icon" />
<bt:Image size="80" resid="dt.TaskpaneButton.Icon" />
</Icon>
<!--Control. It can be of type "Button" or "Menu" -->
<Control xsi:type="Button" id="dt.LetterButton">
<!--Label for your button. resid must point to a ShortString resource -->
<Label resid="dt.LetterButton.Label" />
<Supertip>
<!--ToolTip title. resid must point to a ShortString resource -->
<Title resid="dt.LetterButton.Label" />
<!--ToolTip description. resid must point to a LongString resource -->
<Description resid="dt.LetterButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="dt.LetterButton.Icon16" />
<bt:Image size="32" resid="dt.LetterButton.Icon32" />
<bt:Image size="80" resid="dt.LetterButton.Icon80" />
</Icon>
<!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
<!--Look at the FunctionFile.html page for reference on how to implement the function -->
<Action xsi:type="ExecuteFunction">
<!--Name of the function to call. This function needs to exist in the global DOM namespace of the function file-->
<FunctionName>ShowDialog</FunctionName>
</Action>
</Control>
<Control xsi:type="Button" id="dt.PhraseButton">
<!--Label for your button. resid must point to a ShortString resource -->
<Label resid="dt.PhraseButton.Label" />
<Supertip>
<!--ToolTip title. resid must point to a ShortString resource -->
<Title resid="dt.PhraseButton.Label" />
<!--ToolTip description. resid must point to a LongString resource -->
<Description resid="dt.PhraseButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="dt.PhraseButton.Icon16" />
<bt:Image size="32" resid="dt.PhraseButton.Icon32" />
<bt:Image size="80" resid="dt.PhraseButton.Icon80" />
</Icon>
<!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
<!--Look at the FunctionFile.html page for reference on how to implement the function -->
<Action xsi:type="ExecuteFunction">
<!--Name of the function to call. This function needs to exist in the global DOM namespace of the function file-->
<FunctionName>ShowDialog</FunctionName>
</Action>
</Control>
</Group>
<Group id="dt.Tab1.Group2">
<!--Label for your group. resid must point to a ShortString resource -->
<Label resid="dt.Tab1.GroupLabel2" />
<Icon>
<!-- Sample Todo: Each size needs its own icon resource or it will look distorted when resized -->
<!--Icons. Required sizes 16,31,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX -->
<!--Use PNG icons and remember that all URLs on the resources section must use HTTPS -->
<bt:Image size="16" resid="dt.TaskpaneButton.Icon" />
<bt:Image size="32" resid="dt.TaskpaneButton.Icon" />
<bt:Image size="80" resid="dt.TaskpaneButton.Icon" />
</Icon>
<Control xsi:type="Button" id="dt.SignonButton">
<!--Label for your button. resid must point to a ShortString resource -->
<Label resid="dt.SignonButton.Label" />
<Supertip>
<!--ToolTip title. resid must point to a ShortString resource -->
<Title resid="dt.SignonButton.Label" />
<!--ToolTip description. resid must point to a LongString resource -->
<Description resid="dt.SignonButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="dt.SignonButton.Icon16" />
<bt:Image size="32" resid="dt.SignonButton.Icon32" />
<bt:Image size="80" resid="dt.SignonButton.Icon80" />
</Icon>
<!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
<!--Look at the FunctionFile.html page for reference on how to implement the function -->
<Action xsi:type="ExecuteFunction">
<!--Name of the function to call. This function needs to exist in the global DOM namespace of the function file-->
<FunctionName>OpenAccountStatus</FunctionName>
</Action>
</Control>
<Control xsi:type="Button" id="dt.SignonButton3">
<!--Label for your button. resid must point to a ShortString resource -->
<Label resid="dt.SignonButton.Label" />
<Supertip>
<!--ToolTip title. resid must point to a ShortString resource -->
<Title resid="dt.SignonButton.Label" />
<!--ToolTip description. resid must point to a LongString resource -->
<Description resid="dt.SignonButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="dt.SignonButton.Icon16" />
<bt:Image size="32" resid="dt.SignonButton.Icon32" />
<bt:Image size="80" resid="dt.SignonButton.Icon80" />
</Icon>
<!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
<!--Look at the FunctionFile.html page for reference on how to implement the function -->
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<!-- Provide a url resource id for the location that will be displayed on the task pane. -->
<SourceLocation resid="Contoso.Taskpane.Url" />
</Action>
</Control>
</Group>
<!-- Label of your tab -->
<!-- If validating with XSD it needs to be at the end, we might change this before release -->
<Label resid="dt.Tab1.TabLabel" />
</CustomTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
I am using a sap.m.Dialog and also want to use three buttons. For this I am using the buttons aggregation.
In this situation the problem is that it is not responsive on a phone. What can I do to fix this.
Below is an image of the problem
Screenshot 1
Screenshot 2
Dialog Code
<core:FragmentDefinition
xmlns="sap.m"
xmlns:l="sap.ui.layout"
xmlns:f="sap.ui.layout.form"
xmlns:core="sap.ui.core">
<Dialog title="{i18n>ARACBILGILERIEKLE}" draggable="true" stretch="{device>/isPhone}" verticalScrolling="true">
<f:SimpleForm id="AracBilgileriSimpleForm"
editable="false"
layout="ResponsiveGridLayout"
labelSpanXL="3"
labelSpanL="3"
labelSpanM="3"
labelSpanS="12"
adjustLabelSpan="false"
emptySpanXL="4"
emptySpanL="4"
emptySpanM="4"
emptySpanS="0"
columnsXL="2"
columnsL="1"
columnsM="1"
singleContainerFullSize="false" >
<f:content>
<Label text="{i18n>AKTIFARAC}" />
<CheckBox id="aktifAracCheckBoxID" select="onChangeAktifArac"/>
<Label text="{i18n>ARACTIPI}"/>
<Input id="aracModeliInputID"
value="{aracBilgileri>/AracTipi}"
showValueHelp="true"
valueHelpOnly="true"
valueHelpRequest="onGetValueHelpMarkaModel"/>
<Label text="{i18n>MODELYILI}" />
<ComboBox
id="modelYiliComboID"
items="{ path:'/CustomizingYilSet' }"
selectedKey="{aracBilgileri>/ModelYili}"
change="onChangeModelYili">
<core:Item key="{Key}" text="{Value}" />
</ComboBox>
<Label text="{i18n>SASINO}"/>
<Input id="sasiNoID" maxLength="30" value="{aracBilgileri>/SasiNo}"/>
<Label text="{i18n>SATISTARIHI}"/>
<DatePicker
id="satisTarihiID"
value="{path:'aracBilgileri>/SatisTarihi', type:'sap.ui.model.type.Date', formatOptions: { style: 'medium', strictParsing: true}}"
class="sapUiSmallMarginBottom"/>
</f:content>
</f:SimpleForm>
<buttons width="auto" class="sapUiNoMarginBegin
sapUiNoMarginEnd">
<Button id="updateButtonID" type="Emphasized" icon="sap-icon://save" press="onUpdateAracBilgileri" />
<Button id="createButtonID" type="Emphasized" icon="sap-icon://add" press="onCreateAracBilgileri" />
<Button icon="sap-icon://decline" press="aracBilgileriCancel" />
</buttons>
</Dialog>
</core:FragmentDefinition>
the main concern is my query is running smoothly in SQL and also in table dataset query preview. i mean in table dataset query data preview it's displaying 2 records from my database table.
please find the screen shot.
also find Jrxml file.
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report2" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<style name="table">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="Table Dataset 1">
<queryString>
<![CDATA[select lname, fname from test1
order by fname]]>
</queryString>
<field name="lname" class="java.lang.String"/>
<field name="fname" class="java.lang.String"/>
</subDataset>
<subDataset name="New Dataset 1">
<queryString language="SQL">
<![CDATA[select lname, fname from test1
order by fname]]>
</queryString>
<field name="lname" class="java.lang.String"/>
<field name="fname" class="java.lang.String"/>
</subDataset>
<queryString>
<![CDATA[select lname, fname from test1
order by fname]]>
</queryString>
<field name="lname" class="java.lang.String"/>
<field name="fname" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="79" splitType="Stretch"/>
</title>
<pageHeader>
<band height="35" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="61" splitType="Stretch">
<staticText>
<reportElement x="100" y="41" width="102" height="20"/>
<textElement/>
<text><![CDATA[lname]]></text>
</staticText>
<staticText>
<reportElement x="202" y="41" width="147" height="20"/>
<textElement/>
<text><![CDATA[fname]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="125" splitType="Stretch">
<componentElement>
<reportElement key="table" style="table" x="100" y="0" width="360" height="86"/>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="Table Dataset 1">
<dataSourceExpression><![CDATA[$P{REPORT_DATA_SOURCE}]]></dataSourceExpression>
</datasetRun>
<jr:column width="90">
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20"/>
<textElement/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{lname}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90">
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20"/>
<textElement/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{fname}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="42" splitType="Stretch"/>
</summary>
</jasperReport>
but the output in pdf report is only 1 record which is last 1.
This is happening to me when using a JRBeanCollectionDataSource. I know for a fact that all the data is there but the table tool keeps missing the first row.
It looks like the main report executes a ".next()" on the collection or something then the subreport (a.k.a table) keeps on going with the rest of the data
Anyway, I solved it passing $P{REPORT_DATA_SOURCE}.cloneDataSource() as the dataSource expression of the table. Then it looks like the table starts with a brand new datasource and can iterate through all the items, and so, it works.
I don't know what datasource you are using but you have to figure out a way to move the cursor to the beginning of your data before using the subreport.
So, summing up, I did this in my jrxml file:
<dataSourceExpression><![CDATA[$P{REPORT_DATA_SOURCE}.cloneDataSource()]]></dataSourceExpression>
but Only because I am using a JRBeanCollectionDataSource
Exactly the same problem as kawda and exactly the same behavior than user1972796 : multiple tables instead of one, but correct number of rows in one table.
The problem seams to appear in cases where the master report doesn't iterate over anything and the subreport has been put into the Details Band and references the master data source via $P{REPORT_DATA_SOURCE}
The explanation (and solution) seams to be this one: http://community.jaspersoft.com/wiki/why-first-record-missing-my-subreport
Maybe you should use <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>instead <dataSourceExpression><![CDATA[$P{REPORT_DATA_SOURCE}]]></dataSourceExpression>
How to work in Winforms Crystal Report with Object Data Source?
So far I have found web-links to use Crystal Report with DataSets or Databases directly.
Can anyone show me how to do it like this?
its the same as before...
reportDocument.SetDataSource(List1);
<CR:CrystalReportViewer ID="crvmyDataReport" runat="server"
ReportSourceID="crsmyData" EnableDatabaseLogonPrompt="False" DisplayGroupTree="False"
EnableParameterPrompt="False" ReuseParameterValuesOnRefresh="True"
BorderStyle="Solid" BorderColor="Black" BorderWidth="1px" />
<br />
<CR:CrystalReportSource ID="crsmyData" runat="server">
<Report FileName="myData.rpt">
<DataSources>
<CR:DataSourceRef DataSourceID="odsmyData" TableName="myData" />
</DataSources>
</Report>
</CR:CrystalReportSource>
<asp:ObjectDataSource ID="odsmyData" runat="server"
OldValuesParameterFormatString="original_{0}" SelectMethod="myDataQuery"
TypeName="myDataAppTableAdapters.myDataTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="tb1" ConvertEmptyStringToNull="False"
DbType="String" Name="p1" PropertyName="Text" />
<asp:ControlParameter ControlID="tb2" ConvertEmptyStringToNull="False"
DbType="String" Name="p2" PropertyName="Text" />
<asp:ControlParameter ControlID="tb3" ConvertEmptyStringToNull="False"
DbType="String" Name="p3" PropertyName="Text" />
<asp:ControlParameter ControlID="ddl1" ConvertEmptyStringToNull="False"
DbType="String" Name="p4" PropertyName="SelectedValue" />
</SelectParameters>
</asp:ObjectDataSource>